package Service;

import Dao.Impl.LikeDAOImpl;
import Dao.LikeDAO;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * @Author Su
 * @Date 2025/4/30 10:41
 * @Version 1.0 （版本号）
 */
public class LikeService {
    private LikeDAO likeDAO;

    public LikeService(Connection connection) {
        this.likeDAO = new LikeDAOImpl(connection);
    }

    public boolean hasLiked(int articleId, int userId) throws SQLException {
        return likeDAO.hasLiked(articleId, userId);
    }
}